// import com.alibaba.druid.sql.SQLUtils;
// import com.alibaba.druid.sql.ast.SQLExpr*;
// import com.alibaba.druid.sql.ast.SQLIndex;
// import com.alibaba.druid.sql.ast.SQLIndexDefinition;
// import com.alibaba.druid.sql.ast.SQLName_ptr ;
// import com.alibaba.druid.sql.ast.expr.SQLIntegerExpr;
// import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr;
// import com.alibaba.druid.sql.ast.statement.*;
// import com.alibaba.druid.sql.dialect.mysql.ast.MySqlObject;
// import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

// import java.util.std::list;
#pragma once
#include <list>
#include <string>

#include "../../../../../sql/ast/statement/SQLConstraintImpl.h"
#include "../../../../../sql/ast/statement/SQLTableElement.h"
#include "../../../../../sql/ast/SQLIndex.h"
#include "../../../../../sql/dialect/mysql/ast/MySqlObject.h"

class SQLIndexDefinition;
class SQLName;
class SQLAssignItem;
class SQLColumnDefinition;

class MySqlTableIndex 
: public SQLConstraintImpl,
 virtual public SQLTableElement, 
 virtual public SQLIndex,
  virtual public MySqlObject
{
public:
    SQLIndexDefinition_ptr indexDefinition;

    MySqlTableIndex();
  SHAREDOBJECT(MySqlTableIndex);

    SQLIndexDefinition_ptr getIndexDefinition();

    SQLName_ptr getName();

    string_ptr  getIndexType();

    void setIndexType(string_ptr  indexType);

    void setName(SQLName_ptr name);

    SQLSelectOrderByItem_list_ptr getColumns();

    void addColumn(SQLSelectOrderByItem_ptr column);

    void accept0(SQLASTVisitor_ptr visitor);

    void accept0(MySqlASTVisitor_ptr visitor);

    // MySqlTableIndex* clone() ;
    virtual SQLObject_ptr clone();

    BOOL_ptr applyColumnRename(SQLName_ptr columnName, SQLColumnDefinition *to);

    BOOL_ptr applyDropColumn(SQLName_ptr columnName);

    void addOption(string_ptr  name, SQLExpr_ptr value);

    SQLExpr_ptr getOption(string_ptr  name);

    SQLExpr_ptr getOption(long hash64);

    string_ptr  getDistanceMeasure();

    string_ptr  getAlgorithm();

    SQLAssignItem_list_ptr getOptions();

    SQLExpr_ptr getComment();

    void setComment(SQLExpr_ptr x);

    SQLExpr_ptr getDbPartitionBy();

    void setDbPartitionBy(SQLExpr_ptr x);

    SQLExpr_ptr getTablePartitions();

    void setTablePartitions(SQLExpr_ptr x);

    SQLExpr_ptr getTablePartitionBy();

    void setTablePartitionBy(SQLExpr_ptr x);

    void setCovering(SQLName_list_ptr covering);

    BOOL_ptr isGlobal();

    void setGlobal(BOOL_ptr global);

    BOOL_ptr isLocal();

    void setLocal(BOOL_ptr local);

    // @Override
    SQLName_list_ptr getCovering();

    SQLName_ptr getIndexAnalyzerName();

    void setIndexAnalyzerName(SQLName_ptr indexAnalyzerName);

    SQLName_ptr getQueryAnalyzerName();

    void setQueryAnalyzerName(SQLName_ptr queryAnalyzerName);

    SQLName_ptr getWithDicName();

    void setWithDicName(SQLName_ptr withDicName);

    SQLName_ptr getAnalyzerName();

    void setAnalyzerName(SQLName_ptr analyzerName);
};
